﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:SmartSpace.Silverlight"
	mc:Ignorable="d"
	x:Class="SmartSpace.Silverlight.PopupMessage">
    <UserControl.Resources>
        <Storyboard x:Name="myStoryboard">
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->


            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Value" Storyboard.TargetName="rectTopMargin">
                <EasingDoubleKeyFrame KeyTime="0" Value="-50"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="-50"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <local:ThicknessWrapper x:Name="rectTopMargin" Target="{Binding ElementName=m_border}" Side="Top" PropertyName="Margin"></local:ThicknessWrapper>
        <Border Name="m_border" BorderThickness="1" CornerRadius="1">
            <Grid>
                <Grid Name="m_gridError" Visibility="Collapsed">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="20,10,20,10">
                    <Image Margin="0,0,5,0" Source="./Images/failure2.png" />
                        <Grid>
                            <TextBlock Text="{Binding Path=Text, ElementName=m_textBlockErrorMessage}" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="14" Foreground="Gray" FontWeight="Bold">
                            <TextBlock.Effect>
                                <BlurEffect Radius="5"/>
                            </TextBlock.Effect>
                            </TextBlock>
                            <TextBlock Name="m_textBlockErrorMessage" Text="操作失败" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="14" Foreground="White" FontWeight="Bold">
                            </TextBlock>

                        </Grid>
                    </StackPanel>
                    <Grid.Background>
                        <RadialGradientBrush>
                            <GradientStop Color="#FFFFCE42" Offset="0" />
                            <GradientStop Color="#FFFF8942" Offset="1" />
                            <GradientStop Color="#FFFFCE42" Offset="0.538" />
                        </RadialGradientBrush>
                    </Grid.Background>
                </Grid>
                <Grid Name="m_gridInfo" Visibility="Collapsed" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="20,10,20,10">
                        <Image Margin="0,0,5,0" Source="./Images/success2.png" Width="32" />
                        <Grid>
                            <TextBlock Text="{Binding Path=Text, ElementName=m_textBlockInfoMessage}" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="14" Foreground="Gray" FontWeight="Bold">
                                <TextBlock.Effect>
                                    <BlurEffect Radius="5"/>
                                </TextBlock.Effect>
                            </TextBlock>

                            <TextBlock Name="m_textBlockInfoMessage" Text="操作成功" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="14" Foreground="#FFFAFCFC" FontWeight="Bold"/>
                        </Grid>
                    </StackPanel>
                    <Grid.Background>
                        <RadialGradientBrush>
                            <GradientStop Color="#FFC6E2B6" Offset="0" />
                            <GradientStop Color="#FF94CB5A" Offset="1" />
                        </RadialGradientBrush>
                    </Grid.Background>
                </Grid>
                <Grid Name="m_gridWarning" Background="#BBFFD400" Visibility="Collapsed" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="20,10,20,10">
                        <Image Margin="0,0,5,0" Source="./Images/Warning.png" Width="32" />
                        <TextBlock Name="m_textBlockWarningMessage" Text="操作出错" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="14" Foreground="#FF0878D4" FontWeight="Bold"/>
                    </StackPanel>
                </Grid>
                <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="20,10,20,10">
                    <Image Name="m_imageError" Margin="0,0,5,0" Source="./Images/Error.png" />
                    <Image Name="m_imageInformation" Margin="0,0,5,0" Source="./Images/Information.png" />
                    <Image Name="m_imageWarning" Margin="0,0,5,0" Source="./Images/Warning.png" />
                    <TextBlock Name="m_textBlockMessage" Text="操作成功" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="12" Foreground="Black" FontWeight="Bold"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="20,10,20,10">
                    <Image Name="m_imageError" Margin="0,0,5,0" Source="./Images/Error.png" />
                    <Image Name="m_imageInformation" Margin="0,0,5,0" Source="./Images/Information.png" />
                    <Image Name="m_imageWarning" Margin="0,0,5,0" Source="./Images/Warning.png" />
                    <TextBlock Name="m_textBlockMessage" Text="操作成功" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="SimSun" FontSize="12" Foreground="Black" FontWeight="Bold"/>
                </StackPanel>-->
            </Grid>
            <!--<Grid>
                <Image Name="m_imageSuccess" Margin="0,0,0,0" Source="./Images/alert_success.jpg" />
                <Image Name="m_imageError" Margin="0,0,0,0" Source="./Images/alert_failure.jpg" />
            </Grid>-->
        </Border>
    </Grid>
</UserControl>